package com.dyna.domain;

import com.dyna.constants.DateFatter;
import com.dyna.core.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author zhoucaiwang
 */
@Data
public class DeploymentEntity {

    private String id;

    private String name;

    @JsonFormat(pattern = DateFatter.YYYY_MM_DD_HH_MM_SS)
    private LocalDateTime deploymentTime;

    public void setDeploymentTime(Date deploymentTime) {
        this.deploymentTime = DateUtil.fromDate(deploymentTime);
    }
}
